//
// Created by ken on 8/29/22.
//

#ifndef WI_FI_PARTY_ANDROID_OSCILLATOR_H
#define WI_FI_PARTY_ANDROID_OSCILLATOR_H

#include <atomic>
#include <stdint.h>

class Oscillator {
public:
    void setWaveOn(bool isWaveOn);
    void setSampleRate(int32_t sampleRate);
    void render(short *audioData, int32_t numFrames);

private:
    std::atomic<bool> isWaveOn_{false};
    double phase_ = 0.0;
    double phaseIncrement_ = 0.0;
};


#endif //WI_FI_PARTY_ANDROID_OSCILLATOR_H
